package com.syn.service;

import com.syn.entity.User;
import com.syn.mapper.OrderMapper;
import com.syn.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class UserService {
    @Autowired
    private UserMapper userMapper ;
    @Autowired
    private OrderMapper orderMapper ;
    public User getById(int id){
        orderMapper.selectById(id);
        userMapper.addUser(id);
        List<User> users = userMapper.selectList();
        return  userMapper.selectById(id);
    }
}
